#ifndef ASTNODE_COMPARE_EXPRESSION
#define ASTNODE_COMPARE_EXPRESSION
#include "AstNodeExpression.h"

class AstNodeCompareExpression : public AstNodeExpression
{
  public:
    enum {
      _equal,
      _less,
      _greater,
      _less_equal,
      _greater_equal,
      _not_equal
    };

    AstNodeCompareExpression(AstNodeExpression * left, AstNodeExpression  * expr, unsigned char cmpOperator);

    virtual void  compile(class CompileVisitor *);
    virtual void  dump(int level);

    //virtual int   compile(ClassFile * klass, MethodInfo * method);

    unsigned char              getOpcodeForFalse();
    inline char                getOper() { return oper; }
    inline AstNodeExpression * getLeft() { return left; }
    inline AstNodeExpression * getRite() { return rite; }
  private:
    AstNodeExpression * left;
    AstNodeExpression * rite;
    char                oper;
};

#endif
